import { MessageBox, Message } from 'element-ui'

//删除弹框
export default function myconfirm(text,cancelText) {
  return new Promise((resolve, reject) => {
    MessageBox.confirm(text, '温馨提示', {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      type: 'warning'
    }).then(() => {
      resolve(true)
    }).catch(() => {
        this.$message({
          type: "info",
          message: cancelText
        })
      reject(false)
    })
  }).catch(()=>{
  })
}
